package com.yanqu.road.entity.activity.ghost;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.player.UserBaseInfo;

@FieldTypeAnnotation(tableName = "t_c_activity_ghost_boss")
public class GhostBossData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "批次", select = true, update = true)
    private int batchNo;
    @FieldTypeAnnotation(desc = "ID", update = true)
    private int bossId;
    @FieldTypeAnnotation(desc = "类型")
    private int bossType;
    @FieldTypeAnnotation(desc = "总血量")
    private long totalHp;
    @FieldTypeAnnotation(desc = "当前血量")
    private long curHp;
    @FieldTypeAnnotation(desc = "用户ID")
    private long userId;
    @FieldTypeAnnotation(desc = "用户信息")
    private UserBaseInfo killer = new UserBaseInfo();
    @FieldTypeAnnotation(desc = "击杀时间")
    private long killTime;
    @FieldTypeAnnotation(desc = "生成时间")
    private long createTime;

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public void setBatchNo(int batchNo) {
        if (this.batchNo != batchNo) {
            this.batchNo = batchNo;
            setOp(DataStatus.Update);
        }
    }

    public void setBossId(int bossId) {
        if (this.bossId != bossId) {
            this.bossId = bossId;
            setOp(DataStatus.Update);
        }
    }

    public void setBossType(int bossType) {
        if (this.bossType != bossType) {
            this.bossType = bossType;
            setOp(DataStatus.Update);
        }
    }

    public void setTotalHp(long totalHp) {
        if (this.totalHp != totalHp) {
            this.totalHp = totalHp;
            setOp(DataStatus.Update);
        }

    }

    public void setCurHp(long curHp) {
        if (this.curHp != curHp) {
            this.curHp = curHp;
            setOp(DataStatus.Update);
        }
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public void setKiller(UserBaseInfo killer) {
        this.killer = killer;
        setUpdateOption();
    }

    public void setKillTime(long killTime) {
        if (this.killTime != killTime) {
            this.killTime = killTime;
            setUpdateOption();
        }
    }

    public void setCreateTime(long createTime) {
        if (this.createTime != createTime) {
            this.createTime = createTime;
            setUpdateOption();
        }
    }

    public long getCreateTime() {
        return createTime;
    }

    public long getKillTime() {
        return killTime;
    }

    public int getActivityId() {
        return activityId;
    }

    public int getBatchNo() {
        return batchNo;
    }

    public int getBossId() {
        return bossId;
    }

    public int getBossType() {
        return bossType;
    }

    public long getTotalHp() {
        return totalHp;
    }

    public long getCurHp() {
        return curHp;
    }

    public long getUserId() {
        return userId;
    }

    public UserBaseInfo getKiller() {
        return killer;
    }
}
